﻿// <copyright file="Hyetograph.cs" company="City of Portland, BES-ASM">
// </copyright>
// <summary>Hyetograph class</summary>

namespace BESASM.EMGAATS.BusinessClasses
{
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;

  /// <summary>
  /// Manages a set of time and rainfall intensity (in/hour) pairs
  /// </summary>
  public class Hyetograph
  {
    private List<HyetographPoint> data;
    private IPoint location;

    /// <summary>
    /// Initializes a new instance of the <see cref="Hyetograph"/> class
    /// </summary>
    public Hyetograph()
    {
      this.data = new List<HyetographPoint>();
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="Hyetograph"/> class
    /// </summary>
    /// <param name="location">The coordinates of the location of the hyetograph</param>
    public Hyetograph(IPoint location) : this()
    {
      this.location = location;
    }

    /// <summary>
    /// Gets the list of pairs of time and rainfall intensity (in/hour)
    /// </summary>
    public List<HyetographPoint> Data
    {
      get
      {
        return this.data;
      }
    }

    /// <summary>
    /// Gets the X-coordinate of the location of the Hyetograph
    /// </summary>
    public double X
    {
      get
      {
        return this.location.X;
      }
    }

    /// <summary>
    /// Gets the Y-coordinate of the location of the Hyetograph
    /// </summary>
    public double Y
    {
      get
      {
        return this.location.Y;
      }
    }
  }
}
